package com.ruoyi.subject.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;

/**
 * 题目对象 t_qb_subject
 *
 * @author lzhj
 * @date 2021-01-20
 */
@Api("题目对象")
public class QbSubject extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 题库类型
     */
    @NotBlank(message = "题库类型不能为空")
    @ApiModelProperty(value = "题库类型,字典表bus_rylb")
    @Excel(name = "题库类型")
    private String category;

    /**
     * 题型
     */
    @NotBlank(message = "题型不能为空")
    @ApiModelProperty(value = "题型,字典表subject_type")
    @Excel(name = "题型")
    private String queType;

    /** 类别 */
//    @NotBlank(message = "类别不能为空")
    @ApiModelProperty(value = "类别,字典表subject_class")
    @Excel(name = "类别")
    private String subClass;

    /**
     * 题干
     */
    @NotBlank(message = "题干不能为空")
    @ApiModelProperty(value = "题干,100字")
    @Excel(name = "题干")
    private String title;

    /**
     * 答案
     */
    @ApiModelProperty(value = "答案,100字")
    @Excel(name = "答案")
    private String answer;

    /**
     * 分数
     */
    @ApiModelProperty(value = "分数,3位整数，一位小数")
    @Excel(name = "分数")
    private Float score;

    /**
     * 是否必练题
     */
    @ApiModelProperty(value = "是否必练题,字典表bus_sf")
    @Excel(name = "是否必练题")
    private String must;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态,字典表bus_status")
    @Excel(name = "状态")
    private String status;


    /**
     * 题目选项
     */
    @ApiModelProperty(value = "选项")
    List<QbSubjectItem> qbSubjectItems = new ArrayList<>();

    /**
     * 状态
     */
    @ApiModelProperty(value = "收藏id", hidden = true)
    private String collectId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getCategory() {
        return category;
    }

    public void setQueType(String queType) {
        this.queType = queType;
    }

    public String getQueType() {
        return queType;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getAnswer() {
        return answer;
    }

    public void setScore(Float score) {
        this.score = score;
    }

    public Float getScore() {
        return score;
    }

    public void setMust(String must) {
        this.must = must;
    }

    public String getMust() {
        return must;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public String getSubClass() {
        return subClass;
    }

    public void setSubClass(String subClass) {
        this.subClass = subClass;
    }

    public List<QbSubjectItem> getQbSubjectItems() {
        return qbSubjectItems;
    }

    public void setQbSubjectItems(List<QbSubjectItem> qbSubjectItems) {
        this.qbSubjectItems = qbSubjectItems;
    }

    public String getCollectId() {
        return collectId;
    }

    public void setCollectId(String collectId) {
        this.collectId = collectId;
    }

//    @Override
//    public String toString() {
//        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
//                .append("id", getId())
//                .append("category", getCategory())
//                .append("queType", getQueType())
//                .append("subClass", getSubClass())
//                .append("title", getTitle())
//                .append("answer", getAnswer())
//                .append("score", getScore())
//                .append("must", getMust())
//                .append("status", getStatus())
//                .append("createBy", getCreateBy())
//                .append("createTime", getCreateTime())
//                .append("updateBy", getUpdateBy())
//                .append("updateTime", getUpdateTime())
//                .append("remark", getRemark())
//                .append("qbSubjectItems", getQbSubjectItems())
//                .toString();
//    }


    @Override
    public String toString() {
        return "QbSubject{" +
                "id=" + id +
                ", category='" + category + '\'' +
                ", queType='" + queType + '\'' +
                ", subClass='" + subClass + '\'' +
                ", title='" + title + '\'' +
                ", answer='" + answer + '\'' +
                ", score=" + score +
                ", must='" + must + '\'' +
                ", status='" + status + '\'' +
                ", qbSubjectItems=" + qbSubjectItems +
                ", collectId='" + collectId + '\'' +
                '}';
    }
}
